package com.example.socket.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xiaocg
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DataPackage {
    /**
     * 本协议标记数据
     */
    private byte[] tag = new byte[]{0x20,0x21,0x11,0x05};
    /**
     * 包类型 1:hello,2:data,3:data_ack,4:done,5:finish
     */
    private int type;
    /**
     * value 字段长度
     */
    private int length;
    private byte[] value;

}
